/**
 * @file wa_processbar.h
 *
 */

#ifndef _WA_PROCESSBAR_H
#define _WA_PROCESSBAR_H

#ifdef __cplusplus
extern "C" {
#endif

/*********************
*      INCLUDES
*********************/
#include "wa_conf.h"
#if USE_WA_PROCESSBAR != 0
#include <string.h>
#include <stddef.h>
#include <stdbool.h>
#include <stdint.h>
#include "wa_area.h"
#include "wa_obj.h"
#include "wa_mask_draw.h"
#include "wa_wm.h"
#include "wa_font.h"	
/*********************
*      DEFINES
*********************/


/**********************
*      TYPEDEFS
**********************/

typedef enum
{
	WA_PROCESSBAR_DIR_UP,
	WA_PROCESSBAR_DIR_DOWN,
	WA_PROCESSBAR_DIR_LEFT,
	WA_PROCESSBAR_DIR_RIGHT,
}wa_processbar_direction;

typedef struct
{
	wa_processbar_direction dir;
	int32_t min_value;
	int32_t max_value;
	int32_t value;
	wa_gui_color fore_color;
	wa_gui_color back_color;
	uint32_t edge_size;
	uint32_t interval;
}wa_processbar_ext;

/**********************
* GLOBAL PROTOTYPES
**********************/
void wa_processbar_module_init(void);
wa_obj* wa_processbar_create(wa_obj* par);
void wa_processbar_set_direction(wa_obj* processbar, wa_processbar_direction direction);
void wa_processbar_set_limit_value(wa_obj* processbar, int32_t min, int32_t max);
void wa_processbar_set_value(wa_obj* processbar, int32_t value);
void wa_processbar_set_fore_color(wa_obj* processbar, wa_gui_color color);
void wa_processbar_set_back_color(wa_obj* processbar, wa_gui_color color);
void wa_processbar_set_edge_size(wa_obj* processbar, uint32_t edge_size);
void wa_processbar_set_interval(wa_obj* processbar, uint32_t interval);
wa_processbar_direction wa_processbar_get_direction(wa_obj* processbar);
int32_t wa_processbar_get_value(wa_obj* processbar);
wa_gui_color wa_processbar_get_fore_color(wa_obj* processbar);
wa_gui_color wa_processbar_get_back_color(wa_obj* processbar);
uint32_t wa_processbar_get_edge_size(wa_obj* processbar);
uint32_t wa_processbar_get_interval(wa_obj* processbar);

/**********************
*      MACROS
**********************/

#endif

#ifdef __cplusplus
} /* extern "C" */
#endif

#endif

